#include <fstream>
#include "Arena.h"

Arena::Arena()
{
	string txt;
	ifstream file("assets/Arena.txt");
	if(file.is_open())
	{
		while(file.good())
		{
			getline(file,txt);
			m_grid.push_back(txt);
		}
	}
	file.close();

	m_background = al_load_bitmap("assets/map.png");
}

Arena::~Arena()
{
	al_destroy_bitmap(m_background);
}

void Arena::Render()
{
	al_draw_bitmap(m_background, 0,0,0);
}

char Arena::IsEmpty(int x, int y)
{
	return m_grid[y/20][x/20];
}